require "watir-webdriver"
include Watir


arrFILES = []
file_path = File.dirname(__FILE__) + "/image"
#file_path = Dir.entries(File.dirname(__FILE__) + "/image")
Dir.foreach(file_path) do  |f|
  #|f| files.push(f) if File.file?(f)
  if f != '..' && f!= '.'
    puts f
    arrFILES<<f
  end
end
puts arrFILES.length
file = arrFILES.length
randome_file = Kernel.rand(file)
puts randome_file
puts arrFILES[randome_file]
#Dir.file_.entries.each { |n| files.push(n) if File.file?(n) }
#Dir.entries(File.dirname(__FILE__) + "/image").each { |n| puts 'aa' if File.file?(n)}
#dir_contents = Dir.entries(Dir.pwd)
#dir_contents = Dir.entries("C:\\Users\\.321\\Gardencity\\image")
#files = Array.new
#dir_contents.entries.each { |n| files.push(n) if File.file?(n) }
#puts file
#
#puts "Enter directory containing mp3 files"
#dirname=gets.chomp
#dirname = File.expand_path(dirname)
#puts "Searching #{dirname}"
#dirname += "/**/*.mp3"